""" 用于定义图书管理系统 书 实体 """


class Book:

    def __init__(self, book_id: str, book_type: str, title: str, author: str, press: str, status: str):
        self.book_id = book_id      # 书编号
        self.book_type = book_type  # 书籍类型
        self.title = title          # 书名
        self.author = author        # 作者
        self.press = press          # 出版社
        self.status = status        # 借阅状态

    def __str__(self):
        return f"图书编号：{self.book_id}\t\t图书类型：{self.book_type}\t\t图书名称：《{self.title}》\t\t作者：{self.author}\t\t出版社：{self.press}\t\t图书状态：{'在馆' if self.status == 'false' else '已借出'}"
